<!--
* @author: lzm
* @date: 2023年12月8日 15:04:10
* @description：提示弹窗
* @update: 2023年12月8日 15:04:16
-->
<template>
  <div>
    <el-dialog
      :title="title"
      :visible="showDelDialog"
      width="536px"
      center
      custom-class="my-dialog hardConfig"
      @close="close"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
    >
      <div v-if="type == 'del'" class="title">
        此操作将 <span class="del">永久删除</span> 该数据, 是否继续?
      </div>
      <div v-else-if="type == 'revoke'" class="title">
        确定要 <span class="del">撤销</span> 当前任务吗?
      </div>
      <!-- 按钮 -->
      <div class="btnBox">
        <el-button
          class="dialog-btn"
          size="mini"
          type="primary"
          @click="delBtn"
        >
          确认
        </el-button>
        <el-button class="dialog-btn" size="mini" plain @click="close">
          取消
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  props: {
    showDelDialog: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: '删除提示'
    },
    type: {
      type: String,
      default: 'del'
    }
  },

  data() {
    return {}
  },
  computed: {},
  methods: {
    // 关闭弹窗清空所有值
    close() {
      this.$emit('update:showDelDialog', false)
    },
    // 点击确认按钮
    delBtn() {
      this.$emit('delFn')
    }
  }
}
</script>
<style scoped lang="scss">
::v-deep .hardConfig {
  margin-top: 30vh !important;
  .el-row {
    text-align: center;
  }

  .el-dialog__body {
    padding: 36px 40px;

    .el-form-item__label {
      margin-right: 5px;
      font-size: 18px;
      color: #fff;
      line-height: 48px;
      font-weight: normal;
      padding-left: 24px;
      text-align-last: justify;
    }

    .el-input--small .el-input__inner {
      height: 48px;
      line-height: 48px;
      font-size: 16px;
    }

    .el-form-item__content {
      line-height: 48px;
    }

    .el-input__suffix {
      top: 4%;
      right: 20px;

      .el-button {
        font-size: 17px;
        color: #062343;
        font-weight: 600;
      }
    }

    .dialog-btn {
      margin-top: 10px;
      font-size: 18px;
      height: 40px;
    }

    .weight-box {
      display: flex;
      justify-content: space-between;

      .weight-num {
        margin-left: 16px;
        color: #fff;
        font-size: 18px;
      }

      .operate {
        .el-button {
          font-size: 16px;
        }
      }
    }
  }
}

// 提示弹窗样式
::v-deep .prompt-dialog {
  margin-top: 30vh;

  .el-dialog__body {
    height: 200px;
    text-align: center;
    font-size: 20px;
    color: #fff;
    padding-top: 72px;
  }
}

.title {
  color: #fff;
  text-align: center;
  font-size: 18px;
}

.btnBox {
  margin-top: 24px;
  text-align: center;
}
.del {
  font-size: 18px;
  color: #ff3a3a;
  font-weight: 700;
}
</style>
